{extend name="public/base"}

{block name="x-body"}
    <div class="x-body">
      <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so" method="get">
          <input class="layui-input" placeholder="开始日" name="start" value="{$search_key.start}" id="start">
          <input class="layui-input" placeholder="截止日" name="end" value="{$search_key.end}" id="end">
          <div class="layui-input-inline">
            <select name="pay_code">
              <option value="">支付方式</option>
              <option value="weixin" {$search_key.pay_code == 'weixin' ? 'selected' : ''}>微信</option>
              <option value="alipay" {$search_key.pay_code === 'alipay' ? 'selected' : ''}>支付宝</option>
            </select>
          </div>
          <input type="text" name="order_sn"  placeholder="请输入订单号" autocomplete="off" class="layui-input" value="{$search_key.order_sn}" onfocus="isNum(this)">
          <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
        </form>
      </div>
      <xblock style="height: 40px;">
        <span style="line-height:40px; padding-left: 10px;">总金额：<span style="color: red;">{$list.count_money}</span></span>
        <span style="line-height:40px; padding-left: 30px;">当天金额：<span style="color: red;">{$list.day_money}</span></span>
        <span class="x-right" style="line-height:40px">共有数据：{$list.list -> total()} 条</span>
      </xblock>
      <table class="layui-table layui-form">
        <thead>
          <tr>
            <th>
              <div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>
            </th>
            <th>id</th>
            <th>订单号</th>
            <th>下单用户</th>
            <th>订单金额</th>
            <th>优惠券抵扣</th>
            <th>支付金额</th>
            <th>支付方式</th>
            <th>支付时间</th>
            <th>支付用途</th>
            <th>支付流水号</th>
            </tr>
        </thead>
        <tbody>
          {volist name="list.list" id="v"}
          <tr>
            <td>
              <div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='{$v.id}'><i class="layui-icon">&#xe605;</i></div>
            </td>
            <td>{$v.id}</td>
            <td>{$v.order_sn}</td>
            <td>{$v.mobile}</td>
            <td>{$v.total_amount}</td>
            <td>{$v.coupon_price}</td>
            <td>{$v.pay_price}</td>
            <td>{$v.pay_name}</td>
            <td>{$v.pay_time|date="Y-m-d H:i:s"}</td>
            <td>{if $v.pay_status == 1}支付成功{elseif $v.pay_status == 3 /}支付异常{elseif $v.pay_status == 4 /}退款成功{/if}</td>
            <td>{$v.transaction_id}</td>
          </tr>
          {/volist}
        </tbody>
      </table>
      <div class="page">
        {$list.list -> render()|raw}
      </div>

    </div>
{/block}